/*! \file DeviceContext.h
 *	\brief <write description for DeviceContext.h>
 *
 *	created:	2010/07/12
 *	created:	12:7:2010   18:54
 *	filename: 	C:\src\tactics-engine\libs\gd_dx11\DeviceContext.h
 *	file path:	C:\src\tactics-engine\libs\gd_dx11
 *	file base:	DeviceContext
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _gd_dx11_DEVICECONTEXT_H_
#define _gd_dx11_DEVICECONTEXT_H_

#pragma once

#include <gd/DeviceContext.h>

namespace tt{

namespace app_win{
	class Window;
} //namespace app_win


namespace gd_dx11{

class Device;

class DeviceContext : public gd::DeviceContext
{
public:
	DeviceContext(const utils::COMPointer<ID3D11DeviceContext>&);
	virtual ~DeviceContext();

	utils::COMPointer<ID3D11DeviceContext>& d3dContext();

	void setRenderTarget(const utils::COMPointer<ID3D11RenderTargetView>&);

	void setViewport(const SharedPtr<app_win::Window>&);

	void setVertexShader(utils::COMPointer<ID3D11VertexShader>&);
	void setInputLayout(utils::COMPointer<ID3D11InputLayout>&);

	void setPixelShader(utils::COMPointer<ID3D11PixelShader>&);

protected:
	virtual void onClear();

private:
	utils::COMPointer<ID3D11DeviceContext> m_context;
	utils::COMPointer<ID3D11RenderTargetView> m_renderTarget;
};

DeviceContext* getDx11Context(gd::DeviceContext*);

} //namespace gd_dx11
} //namespace tt
#include "DeviceContext.inl"

#endif //_gd_dx11_DEVICECONTEXT_H_
